﻿<%@ Page Title="Aide" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="MyAccount.aspx.cs" Inherits="Projet_Final_ASP.MyAccount" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
    .style1
    {
        width: 147px;
    }
</style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">


<table>
<tr>
    <td>   
        <ul>
            <li><a href="ChangePassword.aspx">Changer votre mot de passe</a></li>
            <li><asp:Button ID="Historique" runat="server" Text="Historique de commandes" 
                    onclick="Historique_Click" /></li>
        </ul>
    </td>
    <td class="style1">
        <asp:ListView ID="ListView1" runat="server" 
            DataSourceID="SqlDataSource1" Visible="False">
            <AlternatingItemTemplate>
                <span style="background-color: #FAFAD2;color: #284775;">Client:
                <asp:Label ID="ClientLabel" runat="server" Text='<%# Eval("Client") %>' />
                <br />
                Produits:
                <asp:Label ID="ProduitsLabel" runat="server" Text='<%# Eval("Produits") %>' />
                <br />
                <br />
                </span>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <span style="background-color: #FFCC66;color: #000080;">Client:
                <asp:TextBox ID="ClientTextBox" runat="server" Text='<%# Bind("Client") %>' />
                <br />
                Produits:
                <asp:TextBox ID="ProduitsTextBox" runat="server" 
                    Text='<%# Bind("Produits") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                    Text="Update" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Cancel" />
                <br />
                <br />
                </span>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <span>No data was returned.</span>
            </EmptyDataTemplate>
            <InsertItemTemplate>
                <span style="">Client:
                <asp:TextBox ID="ClientTextBox" runat="server" Text='<%# Bind("Client") %>' />
                <br />
                Produits:
                <asp:TextBox ID="ProduitsTextBox" runat="server" 
                    Text='<%# Bind("Produits") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                    Text="Insert" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Clear" />
                <br />
                <br />
                </span>
            </InsertItemTemplate>
            <ItemTemplate>
                <span style="background-color: #FFFBD6;color: #333333;">Client:
                <asp:Label ID="ClientLabel" runat="server" Text='<%# Eval("Client") %>' />
                <br />
                Produits:
                <asp:Label ID="ProduitsLabel" runat="server" Text='<%# Eval("Produits") %>' />
                <br />
                <br />
                </span>
            </ItemTemplate>
            <LayoutTemplate>
                <div ID="itemPlaceholderContainer" runat="server" 
                    style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                    <span runat="server" id="itemPlaceholder" />
                </div>
                <div style="text-align: center;background-color: #FFCC66;font-family: Verdana, Arial, Helvetica, sans-serif;color: #333333;">
                    <asp:DataPager ID="DataPager1" runat="server">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                ShowLastPageButton="True" />
                        </Fields>
                    </asp:DataPager>
                </div>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <span style="background-color: #FFCC66;font-weight: bold;color: #000080;">
                Client:
                <asp:Label ID="ClientLabel" runat="server" Text='<%# Eval("Client") %>' />
                <br />
                Produits:
                <asp:Label ID="ProduitsLabel" runat="server" Text='<%# Eval("Produits") %>' />
                <br />
                <br />
                </span>
            </SelectedItemTemplate>
        </asp:ListView>
    </td>
</tr>
  
</table>   
    
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        
    SelectCommand="SELECT [Client], [Produits] FROM [Paniers] WHERE ([Client] = ?)">
        <SelectParameters>
            <asp:SessionParameter Name="Client" SessionField="User" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    
   
    
</asp:Content>
